package com.symria.system.constants;

import java.util.HashMap;
import java.util.Map;


public enum ATTAdStatus {
	  STATUS_INI("0","未完成"),//initial
	  STATUS_NEW("1","待审批"),//new
	  STATUS_CHE("2","正常"), //check
	  STATUS_STO("3","暂停"), //stop
	  STATUS_DEL("4","删除"), //delete
	  STATUS_REF("5","未通过"),//refuse
	  STATUS_DON("6","结束"),  //done
	  STATUS_WST("7","系统暂停");//wooboo stop
	  public static final Map<String, ATTAdStatus> statusMap = new HashMap<String, ATTAdStatus>();
		static {
			ATTAdStatus[] statu = ATTAdStatus.class.getEnumConstants();
		    for(ATTAdStatus s:statu ) {
		    	statusMap.put(s.status, s);
		}
	  }
	  public static ATTAdStatus fromValue(String status) {
		    return statusMap.get(status);
	  }
	  public static String valueToName(String status){
		  ATTAdStatus s = ATTAdStatus.fromValue(status);
		  return null==s?"":s.toName();
	  }
	  @Override
	  public String toString() {
			return this.status;
	  }
	  public String toName(){
		  return this.name;
	  }
	  private String status;
	  private String name;
	  ATTAdStatus(String status,String name) {
	    this.status = status;
	    this.name = name;
	  }
}
